<template>
    <div class="home">
        <MyNav :menu="menu"></MyNav>
        <div class="right">
            <MyHead></MyHead>
            <router-view/>
        </div>
        
    </div>
</template>

<script>
import MyNav from '../../components/MyNav/nav.vue'
import MyHead from '../../components/MyHead/head.vue'
import { getMeunList } from '../../api/login'
export default {
    name:'home',
    components:{
        MyNav,
        MyHead,
    },
    data() {
        return {
            menu:[]
        };
    },
    methods:{
        async getMeunLists(){
            let res = await getMeunList({
                type: 1
            })
            // console.log(res)
            if( res ){
                this.menu = res.data
                console.log('菜单信息',res)
            }
           
        },
    },
    created(){
        this.getMeunLists()
    }
};
</script>

<style scoped lang="scss">
.home{
    display: flex;
    .right{
        flex: 1;
        margin-left: 20px;
    }
}
</style>
